package com.sskj.extract;

public class Test {
    public static void main(String[] args) {
        String str="package com.sskj.mine.presenter;\n" +
                "\n" +
                "import com.alibaba.android.arouter.launcher.ARouter;\n" +
                "import com.sskj.common.base.HttpData;\n" +
                "import com.sskj.common.util.ToastUtil;\n" +
                "import com.sskj.lib.bean.enums.CodeTypeEnum;\n" +
                "import com.sskj.lib.http.CallBackOption;\n" +
                "import com.sskj.lib.router.provider.SendSmsProvider;\n" +
                "import com.sskj.mine.R;\n" +
                "import com.sskj.mine.ui.activity.SettingFundPwdActivity;\n" +
                "\n" +
                "public class SettingFundPwdPresenter extends BasePresenter<SettingFundPwdActivity> {\n" +
                "    // 获取验证码\n" +
                "    public void sendCode(String account, String slideCode) {\n" +
                "\n" +
                "        SendSmsProvider sendSmsProvider = ARouter.getInstance().navigation(SendSmsProvider.class);\n" +
                "        sendSmsProvider.send(mView, CodeTypeEnum.STATUS_2.getType(), \"\", account, new SendSmsProvider.OnSend() {\n" +
                "            @Override\n" +
                "            public void onSuccess() {\n" +
                "                mView.onSendCodeSuccess();\n" +
                "            }\n" +
                "\n" +
                "        });\n" +
                "    }\n" +
                "\n" +
                "    //设置资金密码\n" +
                "    public void setFundPwd(String phone, String email, String code, String password, String password_confirmation) {\n" +
                "        httpService.setFundPwd(phone, email, code, password, password_confirmation)\n" +
                "                .execute(new CallBackOption<HttpData>() {\n" +
                "                }.loadBind(mView)\n" +
                "                        .execute(httpData -> {\n" +
                "                            ToastUtil.showShort(httpData.getMsg());\n" +
                "                            mView.onSetSuccess();\n" +
                "                        }));\n" +
                "    }\n" +
                "\n" +
                "    public void reSetFundPwd(String phone, String email, String code, String password, String password_confirmation) {\n" +
                "        httpService.reSetFundPwd(phone, email, code, password, password_confirmation)\n" +
                "                .execute(new CallBackOption<HttpData>() {\n" +
                "                }.loadBind(mView)\n" +
                "                        .execute(httpData -> {\n" +
                "                            ToastUtil.showShort(App.INSTANCE.getString(R.string.minesetLoginPwdPresenter1));\n" +
                "                            mView.onSetSuccess();\n" +
                "                        }));\n" +
                "    }\n" +
                "}\n";
        String s = str.replaceFirst("(package[\\s\\S].*?;\\n)", "$1import com.sskj.common.base.App;");
        System.out.println(s);
    }
}
